#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>

using namespace std;
class Solution
{
public:
    int StrToInt(string str)
    {
        int flag = 1;
        int sum = 0;
        for (int i = 0; i < str.size(); i++)
        {
            if (str[i] == '+' || str[i] == '-')
            {
                flag = str[0] == '+' ? flag : -flag;
                continue;
            }
            else if (!(str[i] >= '0' && str[i] <= '9'))
            {
                return 0;
            }
            sum = sum * 10 + str[i] - '0';
        }
        return sum * flag;
    }
};



class Solution {
public:
    void reverseString(vector<char>& s) {
        int begin = 0;
        int end = s.size() - 1;
        while (begin <= end)
        {
            swap(s[begin], s[end]);
            begin++;
            end--;
        }

    }
};